package com.zbs.framework.common.converter;

import com.zbs.framework.common.utils.DateUtils;
import org.springframework.core.convert.converter.Converter;
import org.springframework.lang.NonNull;
import org.springframework.stereotype.Component;

import java.util.Date;

@Component
public class DateConverter implements Converter<String, Date> {
    @Override
    public Date convert(@NonNull String date) {
        return DateUtils.parse(date);
    }
}